<!DOCTYPE html>
<html>
<head lang="zh">
    <meta charset="UTF-8">
    <meta name="author" content="liaosimin">
    <meta name="format-detection" content="telephone=no"/>
    <meta name="viewport" content="width=device-width,user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <title>设置</title>
    <link rel="stylesheet" href="{{static_url('css/set-profile.css')}}"/>
    <link media="all" href="http://i.gtimg.cn/vipstyle/frozenui/1.2.0/css/frozen.css?_bid=306" rel="stylesheet">
    <style>
        body{font-family:"Microsoft YaHei","arial black",sans-serif;color:#333;background:#e7e8ec;}
    </style>
    <script>
        window.dataObj = {
                _xsrf: "{{handler.xsrf_token}}"}; //todo is secure important
    </script>
</head>
<body>
<div class="phone-box">
    <header class="title-box2">
        <a href="{{reverse_url('Home')}}" class="return-btn"></a>
        <span class="title">个人信息</span>
    </header>
    <div class="user-info-detail ">
        <form action="" method="post">
            <ul>
                <li>
                    <div class="info-con">
                        <span class="title img-title pull-left">头像</span>
                        <div style="width: 4.5em;height: 4.5em;float: right;position: relative">
                            <img src="http://7xit5j.com1.z0.glb.clouddn.com/{{current_user.avatar_url or 'FpRSQnxdR5muuwEgeSLfpyQPGkK5'}}"
                                class="user-img"/>
                            <form enctype="multipart/form-data" method="post" name="fileinfo">
                                <input type="file" class="input_file">
                            </form>
                            <span class="fakefile">点击修改</span>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="info-con">
                        <span class="title pull-left">昵称</span>
                        <a href="javascript:;" class="nickname pull-right s1 editInfo" id="userNickname">
                            {{current_user.nickname or ''}}</a>
                    </div>
                    <div class="info-edit" style="display: none;">
                        <input type="text" class="edit-box" id="nicknameEdit" value="{{current_user.nickname or ''}}"/>
                        <div class="btn-box">
                            <a href="javascript:;" class="concel-btn">取消</a>
                            <a href="javascript:;" class="sure-btn" data-action="edit_nickname">确定</a>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="info-con">
                        <span class="title pull-left">真实姓名</span>
                        <a href="javascript:;" class="nickname pull-right s1 editInfo" id="userNickname">
                            {{current_user.realname or ''}}</a>
                    </div>
                    <div class="info-edit" style="display:none;">
                        <input type="text" class="edit-box" id="realname" value="{{current_user.realname or ''}}"
                               placeholder="请设置"/>
                        <div class="btn-box">
                            <a href="javascript:;" class="concel-btn">取消</a>
                            <a href="javascript:;" class="sure-btn" data-action="edit_realname">确定</a>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="info-con">
                        <span class="title pull-left">微信号</span>
                        <a href="javascript:;" class="pull-right editInfo" id="userWechat">{{current_user.wx_username or ''}}</a>
                    </div>
                    <div class="info-edit" style="display:none;">
                        <input type="text" class="edit-box" placeholder="微信号有助于找到你" id="wx_username"
                               value="{{current_user.wx_username or ''}}"/>
                        <div class="btn-box">
                            <a href="javascript:;" class="concel-btn">取消</a>
                            <a href="javascript:;" class="sure-btn" data-action="edit_wx_username">确定</a>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="info-con">
                        <span class="title pull-left">个人邮箱</span>
                        <a href="javascript:;" class="pull-right s1 editInfo" id="userMail">{{current_user.email or ''}}</a>
                    </div>
                </li>
                <li class="w1">
                    <div class="info-con">
                        <span class="title pull-left">性别</span>
                        <a href="javascript:;" class="pull-right s1 showSex editInfo" id="userSex" data-sex="{{current_user.sex}}"
                           style="color:#a8a8a8 !important;">{{'男' if current_user.sex == 1 else '女'}}</a>
                    </div>
                </li>
                <li>
                    <div class="info-con">
                        <span class="title pull-left">出生年月</span>
                        <a href="javascript:;" class="pull-right editInfo" id="userBirthday">{{current_user.birthday.strftime('%Y-%m') if current_user.birthday else ''}}</a>
                    </div>
                    <div class="info-edit" style="display:none;">
                        <input type="text" class="edit-box" placeholder="请输入您的出生年份 例如：2014" id="year" value="{{current_user.birthday.year if current_user.birthday else ''}}"/>
                        <input type="text" class="edit-box" placeholder="请输入您的出生月份 例如：05" id="month" value="{{current_user.birthday.month if current_user.birthday else ''}}"/>
                        <div class="btn-box">
                            <a href="javascript:;" class="concel-btn">取消</a>
                            <a href="javascript:;" class="sure-btn" data-action="edit_birthday">确定</a>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="info-con">
                        <span class="title pull-left">身高(cm)</span>
                        <a href="javascript:;" class="pull-right editInfo" id="user_height">{{current_user.height or ''}}</a>
                    </div>
                    <div class="info-edit" style="display:none;">
                    <textarea type="text" class="edit-box" placeholder="cm" id="height">{{current_user.height or ''}}</textarea>

                        <div class="btn-box">
                            <a href="javascript:;" class="concel-btn">取消</a>
                            <a href="javascript:;" class="sure-btn" data-action="edit_height">确定</a>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="info-con">
                        <span class="title pull-left">体重(kg)</span>
                        <a href="javascript:;" class="pull-right editInfo" id="user_weight">{{current_user.weight or ''}}</a>
                    </div>
                    <div class="info-edit" style="display:none;">
                    <textarea type="text" class="edit-box" placeholder="kg"
                              id="weight">{{current_user.weight or ''}}</textarea>

                        <div class="btn-box">
                            <a href="javascript:;" class="concel-btn">取消</a>
                            <a href="javascript:;" class="sure-btn" data-action="edit_weight">确定</a>
                        </div>
                    </div>
                </li>
                <li>
                    <div class="info-con">
                        <span class="title pull-left">个人说明</span>
                        <a href="javascript:;" class="pull-right editInfo" id="intro">{{current_user.intro or ''}}</a>
                    </div>
                    <div class="info-edit" style="display:none;">
                    <textarea type="text" class="edit-box" placeholder="输入一些个人说明，好多人想认识你"
                              id="intro">{{current_user.intro or ''}}</textarea>

                        <div class="btn-box">
                            <a href="javascript:;" class="concel-btn">取消</a>
                            <a href="javascript:;" class="sure-btn" data-action="edit_intro">确定</a>
                        </div>
                    </div>
                </li>
            </ul>
        </form>
    </div>
    <script src="http://i.gtimg.cn/vipstyle/frozenjs/lib/zepto.min.js?_bid=304"></script>
    <script src="{{static_url('js/set-profile.js')}}"></script>
    <script src="{{static_url('js/lrz.mobile.min.js')}}"></script>
    <script src="http://i.gtimg.cn/vipstyle/frozenjs/1.0.1/frozen.js?_bid=304"></script>
</body>
</html>